/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.partaljevic.tapestry.gambling.pages;

import com.partaljevic.tapestry.gambling.service.Customers;
import com.partaljevic.gambling.Customer;
import com.partaljevic.gambling.Identifiable;
import org.apache.tapestry5.annotations.ApplicationState;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

/**
 *
 * @author Danilo
 */
public class ViewRank {

  
    @Inject
    @Property
    private Customers customers;
    @Property
    private Customer currentCustomer;
    @Property
    private Customer customer;

    public void onActivate(long customerID){
        currentCustomer = customers.retrieve(customerID);
    }

    public long onPassivate(){
        return Identifiable.class.cast(currentCustomer).getID();
    }

    public long getID(){
        return Identifiable.class.cast(currentCustomer).getID();
    }

    
}
